﻿<%@page contentType="text/html" pageEncoding="utf-8"%>
<%@ page import="java.util.*" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>奋青网-社团中心</title>
<link href="css/Main.css" rel="stylesheet" type="text/css"/>
<link href="css/Pro.css" rel="stylesheet" type="text/css"/>
<link href="css/boxy.css" rel="stylesheet" type="text/css"/>
<link href="artDialog/skins/default.css" rel="stylesheet" />
<script type="text/javascript">
	function plan_edit(action){
		window.name = action ; 
		alert(name);
	}
</script>
<script type="text/javascript" src="js/Jquery-1-5-2.js"></script>
<script type="text/javascript" src="artDialog/artDialog.basic.js"></script>
<script type="text/javascript" src="js/Main.js"></script>
<script type="text/javascript" src="js/Club.js"></script>
<script type="text/javascript" src="js/jquery.boxy.js"></script>
<script src="js/redactor/redactor.js"></script>
<link href="js/redactor/css/redactor.css" rel="stylesheet"  type="text/css" />
<script type="text/javascript">


	art.dialog({
    	time: 2,
    	content: '两秒后关闭'
	});
<!--
	function put(){
		location.href="Club?sp=cor&action=put" ;
	}
	function add(){
		location.href="Club?action=add&sp=cor";
	}
	function del(uid){  //踢出成员
		location.href='Club?action=del&sp=cor&uid='+uid;
	}
	function edit(uid,caid){  //踢出成员
		location.href='Club?action=edit&sp=cor&uid='+uid+'&caid='+caid;
	}
	function getType(){
		var type = document.form1.type ;
		var action = document.form1.action ;
		action = action.value ;
		var form = document.form1 ;
		if(type.value==2){
			form.action="${applicationScope.path }/Active";
		}else if(type.value==1){
			form.action="${applicationScope.path }/ArticleList";
		}else if(type.value==0){
			form.action="${applicationScope.path }/ClubList";
		}
	}
-->
</script>

</head>
<body>
<div id="Top">
  <div class="Top_all"> <a href="#"><img src="images/LOGO.jpg"/></a>
    <ul id="Top_Nav">
      <li><a href="${applicationScope.path }/Index">首页</a></li>
      <li><a href="${applicationScope.path }/ArticleList">领域</a></li>
      <li><a href="#">发现</a></li>
    </ul>
    <ul id="Second_Menu">
      	<li><a href="${applicationScope.path }/ClubList">发现社团</a><li>
      	<li><a href="#">对味奋青</a><li>
      	<li><a href="${applicationScope.path }/Active">有趣活动</a><li>
      </ul>
    <div id="Search">
      <div class="Search_l"></div>
      <form name="form1" method="post" action="" onsubmit="getType();">
      	<input type="hidden" name="action" value="search" />
        <input type="text" id="Search_Box" name="content" value="搜索社团、文章、活动..."/>
        <img src="images/search_btn.jpg" id="Search_Btn"/>
        <input type="hidden" value="0" id="Search_What" name="type"/>  <!--传送搜索类型参数-->
      </form>
    </div>
    <div id="Search_Option">
    	<p class="Search_Option_Hover"><img src="images/search_hover0.jpg"/>包含<span></span>的社团</p>
    	<p><img src="images/search_hover1.jpg"/>包含<span></span>的帖子</p>
    	<p><img src="images/search_hover2.jpg"/>包含<span></span>的活动</p>
    </div>
    <div id="User_Top">
    <c:choose>
    	<c:when test="${not empty sessionScope.user}">
    	<c:forEach items="${requestScope.login}" var="login">
    		<img src="${login.uphoto}"/><a href="#">${login.uname}</a>
        	<ul id="User_Info_Box">
	        	<li><a href="${applicationScope.path }/Pro?uid=${login.uid}"><img src="images/home.jpg"/>个人主页</a></li>
	        	<li><a href="${applicationScope.path }/Pro?uid=${login.uid}&lx=private"><img src="images/sms.jpg"/>私信</a></li>
	        	<li><a href="${applicationScope.path }/Pro?uid=${login.uid}&lx=edit"><img src="images/control.jpg"/>设置</a></li>
	        	<li><a href="${applicationScope.path }/Logout.jsp"><img src="images/logout.jpg"/>注销</a></li>
        	</ul>
        </c:forEach>
    	</c:when>
   	 	<c:otherwise>
    		<a href="${applicationScope.path }/Entrance.jsp">您还未登录</a>
    	</c:otherwise>
    </c:choose>
    </div>
    <img src="images/help.jpg" id="Help_Btn" title="帮助中心"/> </div>
</div>
<!--头部结束-->
<div class="Page_Top"></div>
<div class="Page_Middle">
<!--主页部分-->
 <c:if test="${requestScope.sp=='datum'}" var="jh">
   <div class="Pro_Left">
    <p class="Page_Title"></p>
    <p class="Page_Title">社团名称<a href="#" class="Pro_All"></a></p>
    <div class="Title_Line"></div>
    <c:forEach items="${requestScope.corporation}" var="corporation">
    <div class="Pro_Main">
    	<div id="Club_Levle"><span title="成员数量">${corporation.number }</span><span title="活跃度">${corporation.cmark}</span></div>
        <img src="${corporation.cphono }" class="User_Pic"/>
       
       <table width="580" style="line-height:24px;">
            <tr>
            	<td width="80">所属地区：</td><td>${corporation.cwhere}</td>
            	<td rowspan="3">
            	<c:choose>
            	<c:when test="${requestScope.cor_cid=='yes'}">
            		<input type="button" class="Join_Btn" value="已有社团" disabled=true/><br/>
                </c:when>
                <c:otherwise>
                		<input type="button" onclick="add();" class="Join_Btn" value="申请加入"/><br/>
                </c:otherwise>
                </c:choose>
                <c:choose>
                	<c:when test="${requestScope.attention=='yes'}">
                		<input type="button" class="Focus_Btn" value="已关注"/>
                	</c:when>
                	<c:otherwise>
                		<input type="button" onclick="put();" class="Focus_Btn" value="加关注"/>
                	</c:otherwise>
                </c:choose>
                </td>
            </tr>
            <tr>
            	<td>指导老师：</td><td>${corporation.cteacher}${requestScope.attention=='yes'}</td>
            </tr>
            <tr>
                <td>负责人：</td><td>${corporation.name}</td>
            </tr>
            <tr>
            	<td>社团标签：</td><td>${corporation.ctag}</td>
            </tr>
            <tr>
            	<td valign="top">社团简介：</td><td colspan="2">${corporation.content}</td>
            </tr>
        </table>
        
    </div>
    </c:forEach>
    <p class="Page_Title">成员精华帖<a href="?sp=post&cid=${sessionScope.cid}" class="Pro_All"></a></p>
    <div class="Title_Line"></div>
    <div class="Pro_Main">
    	<ul>
    	   <c:forEach items="${requestScope.card}" var="card">
        	<li><span><a href="Pro?uid=${card.uid}"><font color="green">${card.uname}</font></a>&nbsp;&nbsp;发表于:${card.cdtime}</span><a href="${applicationScope.path }/Post?pid=${card.cdid}">${card.cdtitle }</a></li>
           </c:forEach>
           <c:if test="${empty requestScope.card}" var="jh">
           <li>没有帖子</li>
           </c:if>
        </ul>
    </div>
    <p class="Page_Title">活跃成员<a href="?sp=cor&cid=${sessionScope.cid}" class="Pro_All"></a></p>
    <div class="Title_Line"></div>
    <div class="Pro_Main">
        	<div class="Pro_Main">
               <c:forEach items="${requestScope.coruser}" var="users">
                	<li type="none"><a href="Pro?uid=${users.uid}" class="Pro_Focus"><img src="${users.uphoto}"/><br/>${users.uname}</a></li>
       		   </c:forEach>
              <c:if test="${empty requestScope.coruser}" var="users">
                  <li>没有成员</li>
              </c:if>	
          </div>
    </div>
  </div>
 </c:if>
<!--成员部分-->
<c:if test="${requestScope.sp=='cor'}"  var="jh">
  <div class="Pro_Left">
    <p class="Page_Title">成员</p>
    <div class="Title_Line"></div>
    <div class="Pro_Main">
    	<div class="Pro_Change">
    	 <c:choose>
          <c:when test="${requestScope.sb=='no'}">  
        	<input type="button" class="Join_Btn" value='成员列表'  onclick="location.href='?sp=cor&sb=ok';""/>
        	<input type="button" class="Pro_Change_Btn" value='未审核' disabled="true"/>
           </c:when>
           <c:otherwise>
            <input type="button" class="Pro_Change_Btn" value='成员列表' disabled="true"/>
            <c:if test="${requestScope.state!='false'}">
        	<input type="button" class="Join_Btn" value='未审核'  onclick="location.href='?sp=cor&sb=no';"/>
            <a href="javascript:;" class="Notice_Btn">给成员发通知</a>
            <a href="javascript:;" class="Edit_Mate_Btn">批量删除</a>
            </c:if>
           </c:otherwise>
         </c:choose>
        </div>
        <div class="Notice_Box">
        <form action="Club?sp=${requestScope.sp}&action=send" method="post" id="ID" >
        <input type="hidden" class="Users_Id" name="send"/>
        <input type="radio" name="type" value="1"/> 给选中成员发通知 <input type="radio" name="type" checked="checked" value="2" /> 给全部成员发通知
        <input type="text" name="content" style="border:1px solid #999;width:500px;height:30px;"/>
        <input type="submit" class="Focus_Btn" value="发送" onclick="ajaxBox(this,'notice',2)"/>
        </form>
        </div>
        <form class="Club_Mates">
        <c:forEach items="${requestScope.user}" var="users">
        	<li class="Pro_Focus"><a href="Pro?uid=${users.uid }"><img src="${users.uphoto}"/><br/>${users.uname }</a>
        		<c:choose>
        		<c:when test="${requestScope.sb=='no'}"><span class="Delete_Mate_Btn" onclick="edit(${users.uid},${users.acid });" title="批准"/></c:when>
        		<c:otherwise>
        			<c:if test="${requestScope.state!='false'}"><input type="checkbox" class="Select_Mate" title="选中成员" _MatesId="${users.uid}"/><span class="Delete_Mate_Btn" onclick="del(${users.uid});" title="删除成员"/></c:if>
        		</c:otherwise>
        		</c:choose>
        	</li>
        </c:forEach>
        <c:if test="${empty requestScope.user}" var="users">
        	<li class="Pro_Focus">没有成员</li>
        </c:if>
        </form>
  	</div>
  </div>
</c:if>
<!--帖子部分-->
 <c:if test="${requestScope.sp=='post'}" var="jh">
  <div class="Pro_Left">
    <p class="Page_Title">成员精华帖</p>
    <div class="Title_Line"></div>
    <div class="Pro_Main">
    	<ul>
        		<c:forEach items="${requestScope.cord}" var="cord">
        	<li><span>发表于：${cord.cdtime} }</span><a href="#">${cord.cdtitle}</a></li>
        </c:forEach>
        <c:if test="${empty requestScope.active}" var="activity">
	        	<li>还没有精华帖!</li>
	    </c:if>

        </ul>
  	</div>
  </div>
</c:if>
<!--活动部分-->
<c:if test="${requestScope.sp=='acti'}" var="jh">
  <div class="Pro_Left">
    <p class="Page_Title">举办的活动</p>
    <div class="Title_Line"></div>
    <div class="Pro_Main">
    	<ul>
        	<c:forEach items="${requestScope.active}" var="active">
        	<li><span>发起于：${active.date2 }</span><a href="Active?aid=${active.aid }">${active.aname }</a></li>
       	</c:forEach>
       	<c:if test="${empty requestScope.active}" var="activity">
	        	<li>还没有举办过任何活动!</li>
	    </c:if>
        </ul>
  	</div>
  </div>
  </c:if>
<!--学习计划部分-->
<c:if test="${requestScope.sp=='study'}" var="jh">
  <div class="Pro_Left">
    <p class="Page_Title">学习计划</p>
    <div class="Title_Line"></div>
    <div class="Pro_Main">
    	<c:if test="${requestScope.state!='false'}">
    	<div class="Pro_Change">
        	<input type="button" onclick="plan_edit('study');" class="Join_Btn" value='修改计划' id="Plan_Btn"/>
        </div>
        </c:if>
        <c:forEach items="${requestScope.corporation}" var="corporation">
        <div class="Plan_Info">
       	 ${corporation.cplay}
        </div>
     </c:forEach>
  	</div>
  </div>
  </c:if>
<!--规章制度部分-->
<c:if test="${requestScope.sp=='rule'}" var="jh">
  <div class="Pro_Left">
    <p class="Page_Title">规章制度</p>
    <div class="Title_Line"></div>
    <div class="Pro_Main">
    <h4 align="center">规章制度</h4>
    <c:if test="${requestScope.state!='false'}">
        <div class="Pro_Change">
            <input type="button" onclick="plan_edit('rule');" class="Join_Btn" value='修改计划' id="Law_Btn"/>
        </div>
    </c:if>
      <c:forEach items="${requestScope.corporation}" var="corporation">
        <div class="Plan_Info">
       		 ${corporation.csystem}
        </div>
     </c:forEach>
    </div>
  </div>
  </c:if>
<!--修改部分-->
<c:if test="${requestScope.state!='false'}">
<c:if test="${requestScope.sp=='alter'}" var="jh">
  <div class="Pro_Left">
  <c:forEach items="${requestScope.corporation}" var="corporation">
    <p class="Page_Title">修改资料</p>
    <div class="Title_Line"></div>
    <div class="Pro_Main">
    	<form action="Club?sp=alter&action=edit" method="post">
        <table width="700" height="442" align="left" class="Pro_Edit_Table">
        	<tr><td width="160" align="right">标志：</td><td><img src="${corporation.cphono }"/></td></tr>
        	<tr><td align="right">社团名称：</td><td>${corporation.cname }<span onclick="apply(this,'cname');">(申请改名)</span></td></tr>
        	<tr><td align="right">所属地区：</td><td>${corporation.cwhere }<span onclick="apply(this,'school');">(申请修改)</span></td></tr>
        	<tr><td align="right">指导老师：</td><td><input type="text" class="Pro_Input" name="cteacher" value="${corporation.cteacher }"/></td></tr>
        	<tr><td align="right">所属领域：</td><td><div class="Article_Field"><input type="hidden" class="Public_Hidden" value="${corporation.fid }" name="fid"/><c:forEach items="${requestScope.good}" var="at">${at.ftype}</c:forEach></div></td></tr>
        	<tr><td align="right">社团标签：</td><td><input type="text" value="${corporation.ctag }" class="Pro_Input" name="clabel"/></td></tr>
        	<tr><td align="right">社团简介：</td><td><input type="text" value="${corporation.content }" class="Pro_Input" name="content"/></td></tr>
        	<tr><td></td><td><input type="submit" class="Blue_Button" value="保存资料"/></td></tr>
        	<tr><td></td><td><input type="hidden" class="Blue_Button" value="update" name="status"/></td></tr>
        </table>
        </form>
  	</div>
  	</c:forEach>
  </div>
  </c:if>
  </c:if>
  <div class="Pro_Right">
  	<ul class="Pro_Menu">
    	<li><a href="?sp=datum" class="Pro_Menu_Current">社团主页</a></li>
    	<li><a href="?sp=cor">成员</a></li>
    	<li><a href="?sp=post">帖子</a></li>
    	<li><a href="?sp=acti">活动</a></li>
    	<li><a href="?sp=study">学习计划</a></li>
    	<li><a href="?sp=rule">规章制度</a></li>
    	<c:if test="${requestScope.state!='false'}">
    		<li><a href="?sp=alter">修改资料</a></li>
    	</c:if>
    </ul>
  </div>
</div>
<div class="Page_Bottom"></div>
<!--版权部分-->
<div class="Bottom">
  <p><a href="#"><img src="images/LOGO_gray.jpg" align="left"/></a> <a href="#">奋青首页</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#">社团中心</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#">交流圈子</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#">活动中心</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#">帮助中心</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#">使用反馈</a>&nbsp;&nbsp;|&nbsp;&nbsp;联系我们：<a href="mailto:scdzwyxst@gmail.com">scdzwyxst@gmail.com</a>&nbsp;&nbsp;<br />
    CopyRight&copy;&nbsp;2012&nbsp;MayDay  All Rights Reserved</p>
</div>
</body>
</html>
